<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
        <div id="app">
                <ul>
                    <template v-for="book in filterBooks">
                        <li>书名：{{book.name}}</li>
                        <li>作者：{{book.author}}</li>
                    </template>
        
                </ul>
            </div>
            <script src="https://cdn.jsdelivr.net/npm/vue"></script>
            <script>
                var app = new Vue({
                    el: '#app',
                    data: {
                        books: [
                            {
                                name: '《我的一天》',
                                author: '许嘉'
                            },
                            {
                                name: '《我的第一天》',
                                author: '老章'
                            },
                            {
                                name: '《网络知识》',
                                author: '网络'
                            }
                        ]
                    }
                });
                app.books=app.books.filter(function(item){
                    return item.name.match(/我的/);
                })
            </script>
</body>
</html>
